home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Extensions… / UserItems ƒ / UserItems.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  2.0 KB  |  68 lines  |  [TEXT/MPS ]

  1. /*________________________________________________________
  2.  
  3.     File: UserItems.h
  4.  
  5.     C header file for a printing extension that shows how
  6.     to handle hits and updates for userItems in panels.
  7.  
  8.     Dave Hersey
  9.     Apple Developer Technical Support
  10.  
  11.      6/06/93 - dmh - Created.
  12.      9/07/93 - dmh - Updated for b2.
  13.     12/18/93 - dmh - Updated for b3.
  14.      3/22/94 - dmh - Updated for b4.
  15.  
  16.     (Note: labels are in the Mark menu.)
  17.     
  18. __________________________________________________________*/
  19.  
  20. #include <Types.h>
  21. #include <Errors.h>
  22. #include <GXExceptions.h>
  23. #include <Resources.h>
  24. #include <ToolUtils.h>
  25. #include <Collections.h>
  26. #include <Messages.h>
  27. #include <PrintingManager.h>
  28. #include <PrintingMessages.h>
  29.  
  30. #define kCreator                    'U$∑®'            /* Our creator type.            */
  31. #define kExtensionCollectionType    kCreator        /* The collection type we use.    */
  32.  
  33. #define r_ExtensionPanel            6000            /* The ID of our dialog panel.    */
  34. #define kExtensionTurnedOff            0                /* We're turned on.                */
  35. #define kExtensionTurnedOn            1                /* We're turned off.            */
  36.  
  37. #define kDefaultSetting            kExtensionTurnedOn    /* We're on by default.            */
  38.  
  39. #define kMyUserItem                    3                /* DITL item #3 is a user item.    */
  40.  
  41.  
  42. typedef struct ExtensionCollection                    /* This is our collection type.    */
  43. {
  44.     char    extTurnedOn;                            /* Are we enabled?                */
  45.     char    fillByte;
  46. } ExtensionCollection;
  47.  
  48.  
  49. // Prototypes:
  50.  
  51. extern    long A5Size (void);                            /* We need these to set up        */
  52. extern    void A5Init (void *);                        /* our A5 world.                */
  53.  
  54. OSErr    InitGlobalData(void);
  55. OSErr    NewInitialize(void);
  56. OSErr    NewShutDown(void);
  57. OSErr    NewJobPrintDialog(gxDialogResult *dlogResult);
  58. OSErr    NewHandlePanelEvent(gxPanelInfoRecord *panelInfo);
  59. OSErr    NewFilterPanelEvent(gxPanelInfoRecord *panelInfo, Boolean *returnImmed);
  60. OSErr    HandlePanelUpdate(DialogPtr theDialog, gxPanelInfoRecord *panelInfo);
  61. OSErr    HandlePanelHit(DialogPtr theDialog, gxPanelInfoRecord *panelInfo,
  62.                        short theItem, Boolean *returnImmed);
  63. OSErr    SetUpPrintPanel(void);
  64.  
  65. typedef struct MyGlobalRec {
  66.         PicHandle    panelPict;
  67. } MyGlobalRec;
  68.